var Page;
var pageOption = {
    el: ".mainpage",
    data: {
        controller: "",
        formid: "form1",
        labelwidth: form.edit.labelwidth,
        labelposition: form.edit.labelposition,
        form: {},
        rules: {}
    },
    mounted: function () {
        this.$nextTick(function () {
            //页面渲染完执行的操作
            this.init();
        })
    },
    methods: {
        init: function () {
            var mainheight = document.getElementsByClassName("mainpage")[0].clientHeight;
            var topmenu = document.getElementsByClassName("mt-toolbar")[0];
            var editContent = document.getElementsByClassName("mt-edit-content")[0];
            editContent.style.height = (mainheight - topmenu.clientHeight) + "px";
        },
        back: function () {
            //添加
            form.edit.back();
        },
        save: function () {
            //保存
            form.edit.save(this, this.formid, this.form, this.controller + "/save");
        }
    }
}

window.onload = function () {
    //初始化Vue对象配置
    initVueOption(pageOption);
    //加载Vue对象
    Page = new Vue(pageOption);
}